$webwork.htmlEncode($page.space.name) : How to Localize GeoServer
This page last changed on Jul 24, 2007 by cholmes.
IntroductionWe at the GeoServer project would love to see GeoServer available in every language, to become a truely world wide application. We feel one of the main benefits of Open Source is its ability to be customized, and therefor we try to make GeoServer as easy to internationalize as possible. Right now we just have the application translated to French, and the documentation translated to Spanish. This document is going to focus on what is potentially the biggest bang for the buck in internationalization - translating the web administration application. We currently have translations for French, Spanish, Portuguese, German, Japanese and Chinese, and are always looking for more. InstructionsThe GeoServer web administration interface was written on STRUTS , which has a strong focus on what they lovingly refer to as i18n (internationalization, the 18 referring to the number of letters between i and n). For a decent page on how to go about i18n in struts see here . Most of that document need not concern you as a translator, however, as we've done most of the work. All that you need to do is create an appropriate Applications Resources file for your language. ApplicationResources.properties is the main GeoServer english definitions, all the strings used in the web administration interface are defined there. For another language you just need to define them with the translations. The file is found in the WEB-INF/ folder, in the source release it is in geoserver/web/src/main/java, and in a binary distribution it is in GEOSERVER_HOME/webapps/geoserver/WEB-INF. Using either should be fine. To see a sample translation there should be a ApplicationResources_fr.properties in all geoserver downloads. French users should notice that when they use geoserver the messages are in french. STRUTS detects the language settings, so this should all happen seamlessly. To define a new language you just make a properties file with the appropriate two letter ISO language code. So Spanish would define it in a file called ApplicationResources_es.properties Once the file is defined the next start up should pick up the changes, as long as the language is defined correctly. If it does not find the file it defaults to english. Once you have the language defined, we would love it if you would contribute it to GeoServer so other users can also use it. And we can also get you commit rights to maintain it yourself, so you don't have to email whenever we happen to change a message. For more directions on this see Maintaining Translations. Thanks for contributing to GeoServer! |
![]() |
Document generated by Confluence on Jan 16, 2008 23:26 |